tests: Add a test for all selector combination
authorBenjamin Otte <otte@redhat.com>
Sat, 14 May 2011 22:15:25 +0000 (00:15 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 18 May 2011 20:17:56 +0000 (22:17 +0200)
The test contains an error where we complain about a duplicate value for
":hover:hover"

tests/css/parser/Makefile.am
tests/css/parser/selector.css [new file with mode: 0644]
tests/css/parser/selector.errors [new file with mode: 0644]
tests/css/parser/selector.ref.css [new file with mode: 0644]

index b3d5f5f0ea9c5e1637bd1a84fcce7ff3fbdd13fb..84a24225d533e0d10f0cdb7155047e5a1f401abb 100644 (file)
@@ -68,4 +68,6 @@ EXTRA_DIST += \
        integer.ref.css \
        no-semicolon.css \
        no-semicolon.ref.css \
+       selector.css \
+       selector.ref.css \
        simple.css
diff --git a/tests/css/parser/selector.css b/tests/css/parser/selector.css
new file mode 100644 (file)
index 0000000..46ac9ca
--- /dev/null
@@ -0,0 +1,280 @@
+* {
+  int-property: 42;
+}
+
+* * {
+  int-property: 42;
+}
+
+* > * {
+  int-property: 42;
+}
+
+* b {
+  int-property: 42;
+}
+
+* > b {
+  int-property: 42;
+}
+
+*.b {
+  int-property: 42;
+}
+
+* .b {
+  int-property: 42;
+}
+
+* > .b {
+  int-property: 42;
+}
+
+*:hover {
+  int-property: 42;
+}
+
+* :hover {
+  int-property: 42;
+}
+
+* > :hover {
+  int-property: 42;
+}
+
+*#b {
+  int-property: 42;
+}
+
+* #b {
+  int-property: 42;
+}
+
+* > #b {
+  int-property: 42;
+}
+
+a {
+  int-property: 42;
+}
+
+a * {
+  int-property: 42;
+}
+
+a > * {
+  int-property: 42;
+}
+
+a b {
+  int-property: 42;
+}
+
+a > b {
+  int-property: 42;
+}
+
+a.b {
+  int-property: 42;
+}
+
+a .b {
+  int-property: 42;
+}
+
+a > .b {
+  int-property: 42;
+}
+
+a:hover {
+  int-property: 42;
+}
+
+a :hover {
+  int-property: 42;
+}
+
+a > :hover {
+  int-property: 42;
+}
+
+a#b {
+  int-property: 42;
+}
+
+a #b {
+  int-property: 42;
+}
+
+a > #b {
+  int-property: 42;
+}
+
+.a {
+  int-property: 42;
+}
+
+.a * {
+  int-property: 42;
+}
+
+.a > * {
+  int-property: 42;
+}
+
+.a b {
+  int-property: 42;
+}
+
+.a > b {
+  int-property: 42;
+}
+
+.a.b {
+  int-property: 42;
+}
+
+.a .b {
+  int-property: 42;
+}
+
+.a > .b {
+  int-property: 42;
+}
+
+.a:hover {
+  int-property: 42;
+}
+
+.a :hover {
+  int-property: 42;
+}
+
+.a > :hover {
+  int-property: 42;
+}
+
+.a#b {
+  int-property: 42;
+}
+
+.a #b {
+  int-property: 42;
+}
+
+.a > #b {
+  int-property: 42;
+}
+
+:hover {
+  int-property: 42;
+}
+
+:hover * {
+  int-property: 42;
+}
+
+:hover > * {
+  int-property: 42;
+}
+
+:hover b {
+  int-property: 42;
+}
+
+:hover > b {
+  int-property: 42;
+}
+
+:hover.b {
+  int-property: 42;
+}
+
+:hover .b {
+  int-property: 42;
+}
+
+:hover > .b {
+  int-property: 42;
+}
+
+:hover:hover {
+  int-property: 42;
+}
+
+:hover :hover {
+  int-property: 42;
+}
+
+:hover > :hover {
+  int-property: 42;
+}
+
+:hover#b {
+  int-property: 42;
+}
+
+:hover #b {
+  int-property: 42;
+}
+
+:hover > #b {
+  int-property: 42;
+}
+
+#a {
+  int-property: 42;
+}
+
+#a * {
+  int-property: 42;
+}
+
+#a > * {
+  int-property: 42;
+}
+
+#a b {
+  int-property: 42;
+}
+
+#a > b {
+  int-property: 42;
+}
+
+#a.b {
+  int-property: 42;
+}
+
+#a .b {
+  int-property: 42;
+}
+
+#a > .b {
+  int-property: 42;
+}
+
+#a:hover {
+  int-property: 42;
+}
+
+#a :hover {
+  int-property: 42;
+}
+
+#a > :hover {
+  int-property: 42;
+}
+
+#a#b {
+  int-property: 42;
+}
+
+#a #b {
+  int-property: 42;
+}
+
+#a > #b {
+  int-property: 42;
+}
+
diff --git a/tests/css/parser/selector.errors b/tests/css/parser/selector.errors
new file mode 100644 (file)
index 0000000..42cc16e
--- /dev/null
@@ -0,0 +1 @@
+selector.css:201: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
diff --git a/tests/css/parser/selector.ref.css b/tests/css/parser/selector.ref.css
new file mode 100644 (file)
index 0000000..37ba16a
--- /dev/null
@@ -0,0 +1,279 @@
+* {
+  int-property: 42;
+}
+
+* * {
+  int-property: 42;
+}
+
+* > * {
+  int-property: 42;
+}
+
+* b {
+  int-property: 42;
+}
+
+* > b {
+  int-property: 42;
+}
+
+a {
+  int-property: 42;
+}
+
+a * {
+  int-property: 42;
+}
+
+a > * {
+  int-property: 42;
+}
+
+a b {
+  int-property: 42;
+}
+
+a > b {
+  int-property: 42;
+}
+
+.b {
+  int-property: 42;
+}
+
+* .b {
+  int-property: 42;
+}
+
+* > .b {
+  int-property: 42;
+}
+
+:hover {
+  int-property: 42;
+}
+
+* :hover {
+  int-property: 42;
+}
+
+* > :hover {
+  int-property: 42;
+}
+
+.a {
+  int-property: 42;
+}
+
+.a * {
+  int-property: 42;
+}
+
+.a > * {
+  int-property: 42;
+}
+
+:hover {
+  int-property: 42;
+}
+
+:hover * {
+  int-property: 42;
+}
+
+:hover > * {
+  int-property: 42;
+}
+
+:hover {
+  int-property: 42;
+}
+
+a.b {
+  int-property: 42;
+}
+
+a .b {
+  int-property: 42;
+}
+
+a > .b {
+  int-property: 42;
+}
+
+a:hover {
+  int-property: 42;
+}
+
+a :hover {
+  int-property: 42;
+}
+
+a > :hover {
+  int-property: 42;
+}
+
+.a b {
+  int-property: 42;
+}
+
+.a > b {
+  int-property: 42;
+}
+
+:hover b {
+  int-property: 42;
+}
+
+:hover > b {
+  int-property: 42;
+}
+
+.a.b {
+  int-property: 42;
+}
+
+.a .b {
+  int-property: 42;
+}
+
+.a > .b {
+  int-property: 42;
+}
+
+.a:hover {
+  int-property: 42;
+}
+
+.a :hover {
+  int-property: 42;
+}
+
+.a > :hover {
+  int-property: 42;
+}
+
+.b:hover {
+  int-property: 42;
+}
+
+:hover .b {
+  int-property: 42;
+}
+
+:hover > .b {
+  int-property: 42;
+}
+
+:hover :hover {
+  int-property: 42;
+}
+
+:hover > :hover {
+  int-property: 42;
+}
+
+#b {
+  int-property: 42;
+}
+
+* #b {
+  int-property: 42;
+}
+
+* > #b {
+  int-property: 42;
+}
+
+#a {
+  int-property: 42;
+}
+
+#a * {
+  int-property: 42;
+}
+
+#a > * {
+  int-property: 42;
+}
+
+a#b {
+  int-property: 42;
+}
+
+a #b {
+  int-property: 42;
+}
+
+a > #b {
+  int-property: 42;
+}
+
+#a b {
+  int-property: 42;
+}
+
+#a > b {
+  int-property: 42;
+}
+
+#b.a {
+  int-property: 42;
+}
+
+.a #b {
+  int-property: 42;
+}
+
+.a > #b {
+  int-property: 42;
+}
+
+#b:hover {
+  int-property: 42;
+}
+
+:hover #b {
+  int-property: 42;
+}
+
+:hover > #b {
+  int-property: 42;
+}
+
+#a.b {
+  int-property: 42;
+}
+
+#a .b {
+  int-property: 42;
+}
+
+#a > .b {
+  int-property: 42;
+}
+
+#a:hover {
+  int-property: 42;
+}
+
+#a :hover {
+  int-property: 42;
+}
+
+#a > :hover {
+  int-property: 42;
+}
+
+#a#b {
+  int-property: 42;
+}
+
+#a #b {
+  int-property: 42;
+}
+
+#a > #b {
+  int-property: 42;
+}